﻿using System;
using System.Collections.Generic;
using System.Globalization;

namespace UniRx
{
	// Token: 0x020003B8 RID: 952
	[Serializable]
	public struct FrameInterval<T> : IEquatable<FrameInterval<T>>
	{
		// Token: 0x06001382 RID: 4994 RVA: 0x00058DC5 File Offset: 0x000571C5
		public FrameInterval(T value, int interval)
		{
			this._interval = interval;
			this._value = value;
		}

		// Token: 0x17000158 RID: 344
		// (get) Token: 0x06001383 RID: 4995 RVA: 0x00058DD5 File Offset: 0x000571D5
		public T Value
		{
			get
			{
				return this._value;
			}
		}

		// Token: 0x17000159 RID: 345
		// (get) Token: 0x06001384 RID: 4996 RVA: 0x00058DDD File Offset: 0x000571DD
		public int Interval
		{
			get
			{
				return this._interval;
			}
		}

		// Token: 0x06001385 RID: 4997 RVA: 0x00058DE8 File Offset: 0x000571E8
		public bool Equals(FrameInterval<T> other)
		{
			return other.Interval.Equals(this.Interval) && EqualityComparer<T>.Default.Equals(this.Value, other.Value);
		}

		// Token: 0x06001386 RID: 4998 RVA: 0x00058E29 File Offset: 0x00057229
		public static bool operator ==(FrameInterval<T> first, FrameInterval<T> second)
		{
			return first.Equals(second);
		}

		// Token: 0x06001387 RID: 4999 RVA: 0x00058E33 File Offset: 0x00057233
		public static bool operator !=(FrameInterval<T> first, FrameInterval<T> second)
		{
			return !first.Equals(second);
		}

		// Token: 0x06001388 RID: 5000 RVA: 0x00058E40 File Offset: 0x00057240
		public override bool Equals(object obj)
		{
			if (!(obj is FrameInterval<T>))
			{
				return false;
			}
			FrameInterval<T> other = (FrameInterval<T>)obj;
			return this.Equals(other);
		}

		// Token: 0x06001389 RID: 5001 RVA: 0x00058E68 File Offset: 0x00057268
		public override int GetHashCode()
		{
			int num;
			if (this.Value == null)
			{
				num = 1963;
			}
			else
			{
				T value = this.Value;
				num = value.GetHashCode();
			}
			int num2 = num;
			return this.Interval.GetHashCode() ^ num2;
		}

		// Token: 0x0600138A RID: 5002 RVA: 0x00058EBA File Offset: 0x000572BA
		public override string ToString()
		{
			return string.Format(CultureInfo.CurrentCulture, "{0}@{1}", new object[]
			{
				this.Value,
				this.Interval
			});
		}

		// Token: 0x04000B7A RID: 2938
		private readonly int _interval;

		// Token: 0x04000B7B RID: 2939
		private readonly T _value;
	}
}
